package com.ruoyi.lab.service.impl;

import java.util.List;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lab.mapper.LabEquipmentMapper;
import com.ruoyi.lab.domain.LabEquipment;
import com.ruoyi.lab.service.ILabEquipmentService;

/**
 * 设备Service业务层处理
 * 
 * @author mojar
 * @date 2024-10-11
 */
@Service
public class LabEquipmentServiceImpl extends ServiceImpl<LabEquipmentMapper, LabEquipment> implements ILabEquipmentService
{
    @Autowired
    private LabEquipmentMapper labEquipmentMapper;

    @Override
    public List<LabEquipment> queryList(LabEquipment labEquipment) {
        LambdaQueryWrapper<LabEquipment> queryWrapper = new LambdaQueryWrapper<>();
        if(StrUtil.isNotBlank(labEquipment.getEquipmentName())){
            queryWrapper.eq(LabEquipment::getEquipmentName,labEquipment.getEquipmentName());
        }
        queryWrapper.eq(LabEquipment::getDelFlag,'0');
        return labEquipmentMapper.selectList(queryWrapper);
    }
}
